# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=dive
pkgver=0.11.0
pkgrel=3
pkgdesc="Tool for exploring each layer in a docker image"
url="https://github.com/wagoodman/dive"
arch="all"
license="MIT"
depends="docker"
makedepends="go"
source="https://github.com/wagoodman/dive/archive/v$pkgver/dive-$pkgver.tar.gz"
options="chmod-clean !check" # No test suite

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build \
		-trimpath \
		-ldflags "
			-X main.version=$pkgver
			" \
		-o bin/dive .
}

package() {
	install -Dm755 bin/dive "$pkgdir/usr/bin/dive"
}

sha512sums="
79df3fe88d0bc5535ef6ec098cb8d8a264cf64ca353692809c0cb46f77a02edbbfb8df5848173e889b675cc00d8d7c0e5e4500198fc83d0e2f158ab7de4a0e23  dive-0.11.0.tar.gz
"
